package tutor;

import static org.lwjgl.opengl.GL11.*;

import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;

public class Texture {
	public int id;
	public int width;
	public int height;

	// Private constructor to prevent duplication
	private Texture(int id, int width, int height) {
		this.id = id;
		this.width = width;
		this.height = height;
	}

//	public static Texture loadTexture(String name) {
//		BufferedImage bimg = null;
//		try {
//			bimg = ImageIO.read(Texture.class.getClassLoader().getResourceAsStream(name));
//			
//			
//			int textureID = glGenTextures();
//
//			
//
//			ByteBuffer buffer = BufferUtils.createByteBuffer(pixels.length);
//			
//			// Multiply by four for all the four components of the pixel.
//			int[] pixels = new int[bimg.getWidth() * bimg.getHeight() * 4];
//			// Read all the pixels.
//			bimg.getRGB(0, 0, bimg.getWidth(), bimg.getHeight(), pixels, 0, bimg.getWidth());
//			
//		} catch (IOException e) {
//			e.printStackTrace();
//			System.err.println("Unable to load Texture: " + name);
//			Game.end();
//		}
//	}
}
